<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>uvgRTP: include/media_stream.hh Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">uvgRTP
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">media_stream.hh</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160; </div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &lt;unordered_map&gt;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160; </div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;holepuncher.hh&quot;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;pkt_dispatch.hh&quot;</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;rtcp.hh&quot;</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;socket.hh&quot;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &quot;srtp/srtcp.hh&quot;</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &quot;srtp/srtp.hh&quot;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="util_8hh.html">util.hh</a>&quot;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160; </div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &quot;formats/media.hh&quot;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160; </div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="keyword">namespace </span>uvgrtp {</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160; </div>
<div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html">   18</a></span>&#160;    <span class="keyword">class </span><a class="code" href="classuvgrtp_1_1media__stream.html">media_stream</a> {</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;        <span class="keyword">public</span>:</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;            <a class="code" href="classuvgrtp_1_1media__stream.html">media_stream</a>(std::string addr, <span class="keywordtype">int</span> src_port, <span class="keywordtype">int</span> dst_port, rtp_format_t fmt, <span class="keywordtype">int</span> flags);</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;            <a class="code" href="classuvgrtp_1_1media__stream.html">media_stream</a>(std::string remote_addr, std::string local_addr, <span class="keywordtype">int</span> src_port, <span class="keywordtype">int</span> dst_port, rtp_format_t fmt, <span class="keywordtype">int</span> flags);</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;            ~<a class="code" href="classuvgrtp_1_1media__stream.html">media_stream</a>();</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;            <span class="comment">/* Initialize traditional RTP session</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment">             * Allocate Connection/Reader/Writer objects and initialize them</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment">             *</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment">             * Return RTP_OK on success</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment">             * Return RTP_MEMORY_ERROR if allocation failed</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="comment">             *</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment">             * Other error return codes are defined in {conn,writer,reader}.hh */</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;            rtp_error_t init();</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160; </div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;            <span class="comment">/* Initialize Secure RTP session</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="comment">             * Allocate Connection/Reader/Writer objects and initialize them</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="comment">             *</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="comment">             * Return RTP_OK on success</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="comment">             * Return RTP_MEMORY_ERROR if allocation failed</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="comment">             *</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="comment">             * TODO document all error codes!</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="comment">             *</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="comment">             * Other error return codes are defined in {conn,writer,reader,srtp}.hh */</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;            rtp_error_t init(uvgrtp::zrtp *zrtp);</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#a0950a91bd645cbf842d8218ae4171aed">   65</a></span>&#160;            rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#a0950a91bd645cbf842d8218ae4171aed">add_srtp_ctx</a>(uint8_t *key, uint8_t *salt);</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160; </div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#ab2b7507d5b2c76bef74c9bceec07ba18">   89</a></span>&#160;            rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#ab2b7507d5b2c76bef74c9bceec07ba18">push_frame</a>(uint8_t *data, <span class="keywordtype">size_t</span> data_len, <span class="keywordtype">int</span> flags);</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160; </div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#ab2e79cf2f90f81a90ae9c22e0c1fb01e">  113</a></span>&#160;            rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#ab2e79cf2f90f81a90ae9c22e0c1fb01e">push_frame</a>(std::unique_ptr&lt;uint8_t[]&gt; data, <span class="keywordtype">size_t</span> data_len, <span class="keywordtype">int</span> flags);</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160; </div>
<div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#a18975c5463df0664f1fd8ab495248dcc">  144</a></span>&#160;            rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#a18975c5463df0664f1fd8ab495248dcc">push_frame</a>(uint8_t *data, <span class="keywordtype">size_t</span> data_len, uint32_t ts, <span class="keywordtype">int</span> flags);</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160; </div>
<div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#a85fed1e02b97326d3b794551f0677e2b">  175</a></span>&#160;            rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#a85fed1e02b97326d3b794551f0677e2b">push_frame</a>(std::unique_ptr&lt;uint8_t[]&gt; data, <span class="keywordtype">size_t</span> data_len, uint32_t ts, <span class="keywordtype">int</span> flags);</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160; </div>
<div class="line"><a name="l00185"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#ae2fe9e8d9b67e25f103a78a25417149f">  185</a></span>&#160;            uvgrtp::frame::rtp_frame *<a class="code" href="classuvgrtp_1_1media__stream.html#ae2fe9e8d9b67e25f103a78a25417149f">pull_frame</a>();</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160; </div>
<div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#a441263e19be4383223884fde8838f736">  198</a></span>&#160;            uvgrtp::frame::rtp_frame *<a class="code" href="classuvgrtp_1_1media__stream.html#a441263e19be4383223884fde8838f736">pull_frame</a>(<span class="keywordtype">size_t</span> timeout);</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160; </div>
<div class="line"><a name="l00218"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#a74a558b23866976e52c5903996544a27">  218</a></span>&#160;            rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#a74a558b23866976e52c5903996544a27">install_receive_hook</a>(<span class="keywordtype">void</span> *arg, <span class="keywordtype">void</span> (*hook)(<span class="keywordtype">void</span> *, uvgrtp::frame::rtp_frame *));</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160; </div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;            <span class="comment">/* If system call dispatcher is enabled and calling application has special requirements</span></div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;<span class="comment">             * for the deallocation of a frame, it may install a deallocation hook which is called</span></div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;<span class="comment">             * when SCD has processed the frame</span></div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;<span class="comment">             *</span></div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;<span class="comment">             * Return RTP_OK on success</span></div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;<span class="comment">             * Return RTP_INVALID_VALUE if &quot;hook&quot; is nullptr */</span></div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;            rtp_error_t install_deallocation_hook(<span class="keywordtype">void</span> (*hook)(<span class="keywordtype">void</span> *));</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160; </div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;            <span class="comment">/* If needed, a notification hook can be installed to uvgRTP that can be used as</span></div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;<span class="comment">             * an information side channel to the internal state of the library.</span></div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;<span class="comment">             *</span></div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;<span class="comment">             * When uvgRTP encouters a situation it doesn&#39;t know how to react to,</span></div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;<span class="comment">             * it calls the notify hook with certain notify reason number (src/util.hh).</span></div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;<span class="comment">             * Upon receiving a notification, application may ignore it or act on it somehow</span></div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;<span class="comment">             *</span></div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;<span class="comment">             * Currently only one notification type is supported and only receiver uses notifications</span></div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;<span class="comment">             *</span></div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;<span class="comment">             * &quot;arg&quot; is optional argument that is passed to hook when it is called. It may be nullptr</span></div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;<span class="comment">             *</span></div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;<span class="comment">             * Return RTP_OK on success</span></div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;<span class="comment">             * Return RTP_INVALID_VALUE if &quot;hook&quot; is nullptr */</span></div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;            rtp_error_t install_notify_hook(<span class="keywordtype">void</span> *arg, <span class="keywordtype">void</span> (*hook)(<span class="keywordtype">void</span> *, <span class="keywordtype">int</span>));</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160; </div>
<div class="line"><a name="l00255"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#addf1cde9cb8c4e4af3160ce24c4288a5">  255</a></span>&#160;            rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#addf1cde9cb8c4e4af3160ce24c4288a5">configure_ctx</a>(<span class="keywordtype">int</span> flag, ssize_t value);</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160; </div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;            <span class="comment">/* Setter and getter for media-specific config that can be used f.ex with Opus */</span></div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;            <span class="keywordtype">void</span>  set_media_config(<span class="keywordtype">void</span> *config);</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;            <span class="keywordtype">void</span> *get_media_config();</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160; </div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;            <span class="comment">/* Get unique key of the media stream</span></div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;<span class="comment">             * Used by session to index media streams */</span></div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;            uint32_t get_key();</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160; </div>
<div class="line"><a name="l00279"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#a1134ff0271ad54bf1e07feed422118c2">  279</a></span>&#160;            <a class="code" href="classuvgrtp_1_1rtcp.html">uvgrtp::rtcp</a> *<a class="code" href="classuvgrtp_1_1media__stream.html#a1134ff0271ad54bf1e07feed422118c2">get_rtcp</a>();</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160; </div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;        <span class="keyword">private</span>:</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;            <span class="comment">/* Initialize the connection by initializing the socket</span></div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;<span class="comment">             * and binding ourselves to specified interface and creating</span></div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;<span class="comment">             * an outgoing address */</span></div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;            rtp_error_t init_connection();</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160; </div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;            <span class="comment">/* Create the media object for the stream */</span></div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;            rtp_error_t create_media(rtp_format_t fmt);</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160; </div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;            <span class="comment">/* free all allocated resources */</span></div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;            rtp_error_t free_resources(rtp_error_t ret);</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160; </div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;            uint32_t key_;</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160; </div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;            uvgrtp::srtp   *srtp_;</div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;            uvgrtp::srtcp  *srtcp_;</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;            uvgrtp::socket *socket_;</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;            uvgrtp::rtp    *rtp_;</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;            <a class="code" href="classuvgrtp_1_1rtcp.html">uvgrtp::rtcp</a>   *rtcp_;</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160; </div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;            sockaddr_in addr_out_;</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;            std::string addr_;</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;            std::string laddr_;</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;            <span class="keywordtype">int</span> src_port_;</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;            <span class="keywordtype">int</span> dst_port_;</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;            rtp_format_t fmt_;</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;            <span class="keywordtype">int</span> flags_;</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160; </div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;            <span class="comment">/* Media context config (SCD etc.) */</span></div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;            rtp_ctx_conf_t ctx_config_;</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160; </div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;            <span class="comment">/* Media config f.ex. for Opus */</span></div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;            <span class="keywordtype">void</span> *media_config_;</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160; </div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;            <span class="comment">/* Has the media stream been initialized */</span></div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;            <span class="keywordtype">bool</span> initialized_;</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160; </div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;            <span class="comment">/* Primary handler keys for the RTP packet dispatcher */</span></div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;            uint32_t rtp_handler_key_;</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;            uint32_t zrtp_handler_key_;</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160; </div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;            <span class="comment">/* RTP packet dispatcher for the receiver */</span></div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;            uvgrtp::pkt_dispatcher *pkt_dispatcher_;</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160; </div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;            <span class="comment">/* Media object associated with this media stream. */</span></div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;            uvgrtp::formats::media *media_;</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160; </div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;            <span class="comment">/* Thread that keeps the holepunched connection open for unidirectional streams */</span></div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;            uvgrtp::holepuncher *holepuncher_;</div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;    };</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;};</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160; </div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;<span class="keyword">namespace </span>uvg_rtp = uvgrtp;</div>
<div class="ttc" id="aclassuvgrtp_1_1media__stream_html"><div class="ttname"><a href="classuvgrtp_1_1media__stream.html">uvgrtp::media_stream</a></div><div class="ttdef"><b>Definition:</b> media_stream.hh:18</div></div>
<div class="ttc" id="aclassuvgrtp_1_1media__stream_html_a0950a91bd645cbf842d8218ae4171aed"><div class="ttname"><a href="classuvgrtp_1_1media__stream.html#a0950a91bd645cbf842d8218ae4171aed">uvgrtp::media_stream::add_srtp_ctx</a></div><div class="ttdeci">rtp_error_t add_srtp_ctx(uint8_t *key, uint8_t *salt)</div><div class="ttdoc">Add keying information for user-managed SRTP session.</div></div>
<div class="ttc" id="aclassuvgrtp_1_1media__stream_html_a1134ff0271ad54bf1e07feed422118c2"><div class="ttname"><a href="classuvgrtp_1_1media__stream.html#a1134ff0271ad54bf1e07feed422118c2">uvgrtp::media_stream::get_rtcp</a></div><div class="ttdeci">uvgrtp::rtcp * get_rtcp()</div><div class="ttdoc">Get pointer to the RTCP object of the media stream.</div></div>
<div class="ttc" id="aclassuvgrtp_1_1media__stream_html_a18975c5463df0664f1fd8ab495248dcc"><div class="ttname"><a href="classuvgrtp_1_1media__stream.html#a18975c5463df0664f1fd8ab495248dcc">uvgrtp::media_stream::push_frame</a></div><div class="ttdeci">rtp_error_t push_frame(uint8_t *data, size_t data_len, uint32_t ts, int flags)</div><div class="ttdoc">Send data to remote participant with a custom timestamp.</div></div>
<div class="ttc" id="aclassuvgrtp_1_1media__stream_html_a441263e19be4383223884fde8838f736"><div class="ttname"><a href="classuvgrtp_1_1media__stream.html#a441263e19be4383223884fde8838f736">uvgrtp::media_stream::pull_frame</a></div><div class="ttdeci">uvgrtp::frame::rtp_frame * pull_frame(size_t timeout)</div><div class="ttdoc">Poll a frame for a specified time from the media stream object.</div></div>
<div class="ttc" id="aclassuvgrtp_1_1media__stream_html_a74a558b23866976e52c5903996544a27"><div class="ttname"><a href="classuvgrtp_1_1media__stream.html#a74a558b23866976e52c5903996544a27">uvgrtp::media_stream::install_receive_hook</a></div><div class="ttdeci">rtp_error_t install_receive_hook(void *arg, void(*hook)(void *, uvgrtp::frame::rtp_frame *))</div><div class="ttdoc">Asynchronous way of getting frames.</div></div>
<div class="ttc" id="aclassuvgrtp_1_1media__stream_html_a85fed1e02b97326d3b794551f0677e2b"><div class="ttname"><a href="classuvgrtp_1_1media__stream.html#a85fed1e02b97326d3b794551f0677e2b">uvgrtp::media_stream::push_frame</a></div><div class="ttdeci">rtp_error_t push_frame(std::unique_ptr&lt; uint8_t[]&gt; data, size_t data_len, uint32_t ts, int flags)</div><div class="ttdoc">Send data to remote participant with a custom timestamp.</div></div>
<div class="ttc" id="aclassuvgrtp_1_1media__stream_html_ab2b7507d5b2c76bef74c9bceec07ba18"><div class="ttname"><a href="classuvgrtp_1_1media__stream.html#ab2b7507d5b2c76bef74c9bceec07ba18">uvgrtp::media_stream::push_frame</a></div><div class="ttdeci">rtp_error_t push_frame(uint8_t *data, size_t data_len, int flags)</div><div class="ttdoc">Send data to remote participant with a custom timestamp.</div></div>
<div class="ttc" id="aclassuvgrtp_1_1media__stream_html_ab2e79cf2f90f81a90ae9c22e0c1fb01e"><div class="ttname"><a href="classuvgrtp_1_1media__stream.html#ab2e79cf2f90f81a90ae9c22e0c1fb01e">uvgrtp::media_stream::push_frame</a></div><div class="ttdeci">rtp_error_t push_frame(std::unique_ptr&lt; uint8_t[]&gt; data, size_t data_len, int flags)</div><div class="ttdoc">Send data to remote participant with a custom timestamp.</div></div>
<div class="ttc" id="aclassuvgrtp_1_1media__stream_html_addf1cde9cb8c4e4af3160ce24c4288a5"><div class="ttname"><a href="classuvgrtp_1_1media__stream.html#addf1cde9cb8c4e4af3160ce24c4288a5">uvgrtp::media_stream::configure_ctx</a></div><div class="ttdeci">rtp_error_t configure_ctx(int flag, ssize_t value)</div><div class="ttdoc">Configure the media stream, see RTP_CTX_CONFIGURATION_FLAGS for more details.</div></div>
<div class="ttc" id="aclassuvgrtp_1_1media__stream_html_ae2fe9e8d9b67e25f103a78a25417149f"><div class="ttname"><a href="classuvgrtp_1_1media__stream.html#ae2fe9e8d9b67e25f103a78a25417149f">uvgrtp::media_stream::pull_frame</a></div><div class="ttdeci">uvgrtp::frame::rtp_frame * pull_frame()</div><div class="ttdoc">Poll a frame indefinitely from the media stream object.</div></div>
<div class="ttc" id="aclassuvgrtp_1_1rtcp_html"><div class="ttname"><a href="classuvgrtp_1_1rtcp.html">uvgrtp::rtcp</a></div><div class="ttdef"><b>Definition:</b> rtcp.hh:74</div></div>
<div class="ttc" id="autil_8hh_html"><div class="ttname"><a href="util_8hh.html">util.hh</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
